import sqlite3

def db_insert_info(sql,params=None):
    connect = sqlite3.connect("./db.sqlite3")
    cursor = connect.cursor()
    cursor.executemany(sql,params)
    connect.commit()
    connect.close()
    return connect
def db_select_info(sql):
    connect = sqlite3.connect("./db.sqlite3")
    cursor = connect.cursor()
    cursor.execute(sql)
    results = cursor.fetchall()
    connect.commit()
    connect.close()
    return results
def db_update_info(sql,params=None):
    connect = sqlite3.connect("./db.sqlite3")
    cursor = connect.cursor()
    cursor.executemany(sql,params)
    results = cursor.fetchall()
    connect.commit()
    connect.close()
    return results

def db_select_info_params(sql,params=None):
    connect = sqlite3.connect("./db.sqlite3")
    cursor = connect.cursor()
    cursor.execute(sql,params)
    results = cursor.fetchall()
    connect.commit()
    connect.close()
    return results